<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        border: solid;
        padding: 10px;
      }
    </style>
  </head>
  <body>
    <div id="app"></div>

    <template id="t1">
      <div>
        <a href="./a.html" @click.prevent>hello</a>

        <div class="box" @click="log(1)" @click.capture="log(11)">
          box1
          <div class="box" @click="log(2)" @click.capture="log(22)">
            box2
            <div class="box" @click="log(3)" @click.capture="log(33)">box3</div>
          </div>
        </div>
      </div>
    </template>
    <script src="./vue.js"></script>
    <script>
      const vm = new Vue({
        el: "#app",
        template: "#t1",
        methods: {
          log(ctx) {
            console.log(ctx);
          },
        },
      });
    </script>
  </body>
</html>
